// change save handler here. 
//
IO.setSaveXMLFunction(function (uri, xmlDocument) {
     // alert("This demo does not support saving the document. \nYou can see the actual source XML in the XML View \n(From the Xopus > Document View menu)");
 // var realURI = '';
  if (uri.match(/^urn:xopus-dita-example/)) {
    realURI = uri.replace(/^urn:xopus-dita-example:remote.php\?path=(.*)(#.+)?$/, '$1');
  } else {
    // Clean out content of conref having elements
    realURI = uri.substring(uri.indexOf("?fileId="));
  }
  var result = HTTPTools.postXML("/~alex/ditaserver/?r=cmis/save&path=" + realURI, xmlDocument, "UTF-8");
  if (result != "Ok")
  {
    alert(result);
    return false;
  }
  else
    return true;
    });

